package org.uma.jmetal.problem;

import org.uma.jmetal.solution.Solution;
import org.uma.jmetal.util.observable.Observable;
import org.uma.jmetal.util.observer.Observer;

/**
 * Interface representing dynamic problems. Problems implementing this interface act as {@link Observer} entities
 * in the sense that the can register themselves in {@link Observable} objects that may modify some of the problem
 * properties. A dynamic problem has an internal state about whether it has been updated or not, and there are methods
 * to query, set, and reset that state.
 *代表动态问题的界面。 实现此接口的问题充当{@link Observer}实体
 *可以在{@link Observable}对象中注册自己，这可能会解决某些问题
 *属性。 动态问题具有有关是否已更新的内部状态，并且有一些方法
 *查询，设置和重置该状态。
 * @author Antonio J. Nebro <ajnebro@uma.es>
 */
public interface DynamicProblem<S extends Solution<?>, D>
    extends Problem<S> {

  void update(D value) ;

  boolean hasChanged() ;
  void setChanged() ;
  void clearChanged() ;
}